#version 330 core
layout(points) in;
layout(line_strip, max_vertices = 2) out;

in vec3 vNormal[];

uniform mat4 model;
uniform mat4 view;
uniform mat4 projection;

void main()
{
    gl_Position = projection * view * model * gl_in[0].gl_Position;
    EmitVertex();

    // 原始顶点进行偏移
    gl_Position = projection * view * model * (gl_in[0].gl_Position + vec4(vNormal[0], 0));
    EmitVertex();

    EndPrimitive();
}